import request from '@/utils/request';

/**获取上报流程 */
export function getReportProcessList(params) {
  return request({
    url: '/bpm/process-definition/list/v',
    method: 'get',
    params,
  });
}
/**获取列表 */
export function getAdvEveRepTem(data) {
  return request({
    url: '/advEveRepTem/page',
    method: 'post',
    data: data,
  });
}
/**新建 */
export function addForm(data) {
  return request({
    url: '/document/add',
    method: 'post',
    data: data,
  });
}
/**修改 */
export function updateForm(data) {
  return request({
    url: '/document/update',
    method: 'post',
    data: data,
  });
}
/**删除 */
export function deleteForm(data) {
  return request({
    url: '/document/' + data.documentInfoId + '?bizModule=' + data.bizModule,
    method: 'delete',
  });
}

/**获取文档详情 */
export function getDocumentDetail(data) {
  return request({
    url: '/document/detail',
    method: 'post',
    data,
  });
}

/** */
export function getProperties() {
  return request({
    url: '/formEditor/detail/properties',
    method: 'get',
  });
}

/**获取所有版本 */
export function getVersionList(documentInfoId) {
  return request({
    url: '/document/list/version/' + documentInfoId,
    method: 'get',
  });
}

/**发布 */
export function documentPublish(data) {
  return request({
    url: '/document/publish',
    method: 'post',
    data,
  });
}

/**查询表单字段说明与编码 */
export function getPresetFields() {
  return request({
    url: '/formEditor/getPresetFields',
    method: 'get',
  });
}
/**发布表单字段说明与编码 */
export function updatePresetFields(data) {
  return request({
    url: '/formEditor/updatePresetFields',
    method: 'post',
    data,
  });
}

/** ----------------------------分析报告模板表------------------- */
/**获取列表 */
export function getAdvEveRepSumTem(data) {
  return request({
    url: '/advEveRepSumTem/page',
    method: 'post',
    data: data,
  });
}
